package com.wuming.house.service;


import com.wuming.house.core.BusinessException;
import com.wuming.house.model.Houseprice;
import com.wuming.house.model.HousepriceTrend;

import java.util.List;

public interface HousepriceService {

    /**
     * 保存房价信息
     *
     * @param houseprice 房价信息
     * @throws BusinessException
     */
    void saveHouseprice(Houseprice houseprice) throws BusinessException;

    /**
     * 修改房价信息
     *
     * @param houseprice 房价信息
     * @throws BusinessException
     */
    void modifyHouseprice(Houseprice houseprice) throws BusinessException;

    /**
     * 根据房价id查询房价信息
     *
     * @param id 房价id
     * @return 房价信息
     * @throws BusinessException
     */
    Houseprice getHousepriceById(Long id) throws BusinessException;

    /**
     * 根据城市名称查询房价信息
     *
     * @param city  城市名称
     * @param year  当前年份
     * @param month 当前月份
     * @return 房价信息
     * @throws BusinessException
     */
    List<Houseprice> getHousepriceByCity(String city, Integer year, Integer month) throws BusinessException;




    /**
     * 查询一年之内的房价信息
     *
     * @param city 城市
     * @return
     * @throws BusinessException
     */
    List<Houseprice> getHousepriceBetweenOneYear(String city) throws BusinessException;

    /**
     * 根据房价获取房价趋势
     *
     * @param houseprices 房价列表
     * @return 房价趋势
     * @throws BusinessException
     */
    HousepriceTrend getTrendByHouseprices(List<Houseprice> houseprices) throws BusinessException;

    void deleteById(Long id);


}
